#!/bin/sh


if [ -n "$_VL_IMPORT_GENERATE_FOR_COMMAND" ] ; then
	return;
fi
_VL_IMPORT_GENERATE_FOR_COMMAND=0

######################################################
######################################################
# 指定生成文件方法
######################################################
######################################################

# 生成构建配置文件
# 参数 1 : 文件路径
# 
# 返回值 : 生成成功返回 0
function generateBuildConfig() {


	cat > "$1" << EOF 
# Project Name
VL_NAME=


# Project Type:
# exec - executable project
# lib  - library project, support dynamic library and static library
VL_TYPE=lib


# Use dependencies
# dependency format: "[ProjectName] [git url] [version] [link type]"
# link type:
# static  - static link
# dynamic - dynamic link
# header - header only
# example:
# VL_DEP=vl_semphore https://gitee.com/CimZzz/vl_semphore.git master static
#
#
# if need multi-line dependencies, use '\', like this:
#
# VL_DEP=vl_semphore https://gitee.com/CimZzz/vl_semphore.git master static \\
# vl_semphore https://gitee.com/CimZzz/vl_semphore.git master static \\
# vl_semphore https://gitee.com/CimZzz/vl_semphore.git master static \\
# vl_semphore https://gitee.com/CimZzz/vl_semphore.git master static \\
# any more ...
VL_DEP=
EOF
	if [ $? -ne 0 ] ; then
		return 1
	fi

	return 0
}

# 生成编译工具链配置
# 参数 1 : 文件地址
# 
# 返回值 : 创建成功返回 0
function generateToolchain() {
	cat > "$1" << EOF
# Search for dependent libraries within DIR (or the compiler's sysroot if not specified).
VL_CONFIG_ARGS_SYSROOT=

# cross-compile to build programs to run on HOST
VL_CONFIG_ARGS_HOST=

# configure for building on BUILD
VL_CONFIG_ARGS_BUILD=

# C compiler command
VL_CONFIG_ARGS_CC=

# C++ compiler command
VL_CONFIG_ARGS_CXX=

# ar compiler command
VL_CONFIG_ARGS_AR=

# ranlib compiler command
VL_CONFIG_ARGS_RANLIB=
EOF

	if [ $? -ne 0 ] ; then
		return 1
	fi

	return 0
}